home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / dosguide.exe / HELPDOS.ZIP / FIND.HLP < prev    next >
Text File  |  1985-09-10  |  2KB  |  62 lines

  1. ------------------------  FIND - External DOS Command  -------------------------
  2.  
  3. FIND searches files, or other data, for a specified string of characters.
  4.  
  5. FORMAT:   FIND [/V][/C][/N] "string" [[d:][path]filename[.ext]...]
  6.  
  7. REMARKS:
  8.  
  9.    string    - is the string of characters to be searched for.  You must use
  10.                upper/lower case as appropriate to specify the exact string.
  11.  
  12.    [d:][path]filename[.ext] - the file to be searched.  You may specify multiple
  13.                files but you may not use the Global symbols (* and ?) for the
  14.                filename or extension.  If the drive letter, d, is omitted, the
  15.                default drive is assumed.  If "path" is omitted, the current
  16.                directory is assumed.
  17.  
  18.    /V        - displays all lines that do not contain "string."
  19.    /C        - displays a count of the number of times a match was found for
  20.                "string" in each file.  Matching lines are not displayed.
  21.    /N        - displays the relative line numbers ahead of the lines that
  22.                contain matches.
  23.  
  24.    If /C is used, FIND ignores any /V or /N parameters.
  25.  
  26.  
  27. EXAMPLES:
  28.  
  29. Display all lines in the files MEMO1.TXT, MEMO2.TXT and MEMO3.TXT that contain
  30. the string "Mr. Smith."  The files are in the current directory on the default
  31. drive:
  32.  
  33.           FIND "Mr. Smith"  MEMO1.TXT MEMO2.TXT MEMO3.TXT
  34.  
  35.  
  36. Display a count of all lines of file MEMO1.TXT that contain the string "the".
  37. MEMO1.TXT is in the DOC directory on the B drive.  DOC is a subdirectory of the
  38. root directory.  The default drive is A:
  39.  
  40.           FIND /C "the" B:\DOC\MEMO1.TXT
  41.  
  42.  
  43. Display all lines, and their relative line numbers in the file MEMO1.TXT that do
  44. not contain the string "the".  MEMO1.TXT is in the current directory on the
  45. default drive:
  46.  
  47.           FIND /V /N "the" MEMO1.TXT
  48.  
  49.  
  50. Find the string "5-31-85" in a directory listing of the current directory on the
  51. default drive.  This will display a directory listing for files written on
  52. 5-31-85:
  53.  
  54.           DIR | FIND "5-31-85"
  55.  
  56.  
  57. Find the string "FY86" in a directory listing of the current directory on the
  58. default drive.  Sort the matching lines by the date the file was written in
  59. reverse order and send the output to the printer:
  60.  
  61.           DIR | FIND "FY86" | SORT /R/+24 > PRN
  62.